#define _CRT_SECURE_NO_WARNINGS
#include <Stdio.h>
void Func(int* p, int sz)
{
	int* left = p;
	int* right = p + sz - 1;
	while (left < right)
	{
		while (left < right && *left % 2 != 0)
		{
			left++;
		}
		while (left < right && *right % 2 == 0)
		{
			right--;
		}
		if(left<right)
        {
            int tmp = *left;
		    *left = *right;
		    *right = tmp;
        }
	}
}
int main()
{
	int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	Func(arr, sz);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}
//